package com.wdj.structural.adapter.pattern.adapter;

import com.wdj.structural.adapter.pattern.controller.CarController;

/**
 * @ClassName PoliceCarAdapter
 * @Description
 * @Author wdj
 * @Date 2020/12/15 21:23
 * @Version 1.0
 **/
public class PoliceCarAdapter extends CarController {
    private PoliceSound policeSound;
    private Policelamp policelamp;
    public PoliceCarAdapter(){
        policeSound = new PoliceSound();
        policelamp =  new Policelamp();
    }

    @Override
    public void phonate() {
        policeSound.alarmSound();
    }

    @Override
    public void twinkle() {
        policelamp.alarLamp();
    }


}
